package com.eedi.framework.protocol.controller.sys.vo;

import com.eedi.framework.common.enums.CommonStatusEnum;
import com.eedi.framework.common.validation.AddGroup;
import com.eedi.framework.common.validation.UpdateGroup;
import com.eedi.framework.protocol.enums.SysProtocolApplyTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Schema(description = "系统界面 - 协议配置新增/修改 Request VO")
@Data
public class SysProtocolSaveReq {

    /**
     * 协议配置ID
     */
    @Schema(description = "协议配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7778")
    @NotEmpty(message = "协议配置ID不能为空", groups = UpdateGroup.class)
    private String systemProtocolId;

    /**
     * 协议名称
     */
    @Schema(description = "协议名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @NotEmpty(message = "协议名称不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String name;

    /**
     * "协议应用场景：1注册登录 2专家问诊 3便民问诊 4患者评价 见枚举详情不能为 protocol_apply_type
     */
    @Schema(description = "协议应用场景：1注册登录 2专家问诊 3便民问诊 4患者评价 见枚举详情", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "协议应用场景：1注册登录 2专家问诊 3便民问诊 4患者评价 见枚举详情不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private SysProtocolApplyTypeEnum protocolApplyType;

    /**
     * "协议内容
     */
    @Schema(description = "协议内容说明", example = "你说的对" , requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "协议内容不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String protocolContent;

    /**
     * 协议备注说明
     */
    @Schema(description = "协议备注说明", example = "你说的对")
    private String description;

    /**
     * 显示顺序
     */
    @Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "显示顺序不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private Integer sort;

    /**
     * 协议发布状态
     */
    @Schema(description = "协议发布状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "协议发布状态不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private CommonStatusEnum publishStatus;

}
